package cn.kgc.fallback;

import cn.kgc.feignclient.UserFeignClient;
import cn.kgc.pojo.User;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @ClassName UserFeignClientFallBack
 * @Description TODO
 * @Author yaozhaobao
 * @Date 2020/12/13 16:31
 * @Version 1.0
 **/

/**
 * 当远程服务无法访问则执行熔断器内容
 */
@Component
public class UserFeignClientFallBack implements UserFeignClient {
    @Override
    public boolean loginByNP(String userCode, String userPssword) {
            System.out.println("进入熔断器，fallback");
            return  false;

    }

    @Override
    public boolean loginByNP2(Map<String, String> map) {
        return false;
    }

    @Override
    public boolean loginByNP3(User user) {
        return false;
    }

    @Override
    public Integer addUser(User user) {
        return 0;
    }

    @Override
    public void testRibbon(int num) {

    }
}
